package com.baihan.angus.app.game.busshow.ui.script_library.online_exhibition.room;

import android.os.Bundle;
import android.widget.LinearLayout;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.baihan.angus.app.game.basic.base.BaseActivity;
import com.baihan.angus.app.game.basic.configs.BasicConfig;
import com.baihan.angus.app.game.busshow.BR;
import com.baihan.angus.app.game.busshow.R;
import com.baihan.angus.app.game.busshow.databinding.ActivityBgStoryBinding;
import com.baihan.angus.app.game.common.arouter_path.ArouterAppPath;
import com.gyf.immersionbar.ImmersionBar;

/**
 * 背景故事
 */
@Route(path = ArouterAppPath.BG_STORY_ACTIVITY)
public class BgStoryActivity extends BaseActivity<ActivityBgStoryBinding, BgStoryVM> {

    @Autowired(name = "bgStory")
    String bgStory;

    @Override
    protected int getContentLayout() {
        return R.layout.activity_bg_story;
    }

    @Override
    protected int getViewModelId() {
        return BR.bgStroyVM;
    }

    @Override
    protected void initStatusBar() {
        ImmersionBar.with(this).fitsSystemWindows(false).transparentStatusBar().statusBarDarkFont(BasicConfig.getInstance().isDayMode()).init();
    }

    @Override
    protected void initView(Bundle savedInstanceState) {

        LinearLayout.LayoutParams rlTitle = (LinearLayout.LayoutParams) mVDBinding.title.getLayoutParams();
        rlTitle.topMargin = ImmersionBar.getStatusBarHeight(this);
        mVDBinding.title.setLayoutParams(rlTitle);

        mVDBinding.ivClose.setOnClickListener(view -> finish());

    }
}